package bean;
import java.sql.SQLException;
import java.util.Vector;

import dao.StudentDAO;
import dao.UniversityDAO;
import db.*;



public class StudentBean implements UniversityBean  {
	private String nume;
	private String prenume;
	private String telefon;
	private int idGroup;
	private int id;
	
	public StudentBean(){
		this.idGroup=0;
		this.idGroup=0;
		this.nume=null;
		this.prenume=null;
		this.telefon=null;		
	}
	
	
	
	public StudentBean(String nume,String prenume,String tel,int idGr,int id){
		this.idGroup=idGr;
		this.id=id;
		this.nume=nume;
		this.prenume=prenume;
		this.telefon=tel;		
	}
	
	public StudentBean(int id){
		
		this.id=id;
		
	}
	public void  setName(String name){
		this.nume=name;
	}
	
	public void setPrenume(String prenume){
		this.prenume=prenume;
	}
	
	public void setTelefon(String tel){
		this.telefon=tel;
	}
	public void setIdGroup(int idGr){
		this.idGroup=idGroup;
	}
	public String getNume (){
		return this.nume;
	}
	public String getPrenume (){
		return this.prenume;
	}
	public String getTel (){
		return this.telefon;
	}
	public void setId(int id){
		this.id=id;
	}
	public int getIdGr(){
		return this.idGroup;
	}
	public int getId(){
		return this.id;
	}
	
	public Vector getRow(){
		Vector<String> vc = new Vector<String>();
		vc.add(Integer.toString(this.id));
		vc.add(this.nume);
		vc.add(this.prenume);
		vc.add(this.telefon);
		
		
		return vc;
	}

	@Override
	public UniversityDAO getDAO() throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException {
		return new StudentDAO();
	}
}
